/*
 * @Author: szx
 * @Date: 2022-04-29 16:51:57
 * @LastEditTime: 2022-05-03 16:23:56
 * @Description:
 * @FilePath: \learn\React学习\github搜索\src\App.js
 */
import React, { Component } from 'react';
import Search from './components/Search';
import List from './components/List';

export default class App extends Component {
    state = {
        users: [],
        isFirst: true,
        isLoading: false,
        err: ''
    };

    updateAppState = (stateObj) => {
        this.setState(stateObj);
    };

    render() {
        return (
            <div className="container">
                <Search updateAppState={this.updateAppState} />
                <List {...this.state} />
            </div>
        );
    }
}
